<template>
  <div class="workshops_container">
    <!-- <dv-loading v-if="loading"></dv-loading> -->
    <list-header
      :type="type"
      :title="title"
      icon="cogs"
      searchplaceholder="请输入设备名称/编号"
      selectplaceholder="请选择安装地点"
      @on-search="SearchMthods"
      @on-index="resetMethods"
      :location="true"
      :used="true"
    />
    <div class="workshops_main">
      <c-tbale
        @delHandle="delHandle"
        :columns="columns"
        :tableData="tableData"
        :tableHeight="tableHeight"
      />
      <div class="page_con">
        <el-pagination
          @current-change="currentchange"
          @prev-click="currentchange"
          @next-click="currentchange"
          :background="true"
          layout="prev, pager, next"
          :total="totalCount"
          :hide-on-single-page="totalCount < 2 ? true : false "
        >
        </el-pagination>
      </div>
    </div>
  </div>
</template>

<script>
import listHeader from "@/components/listHeader/index";
import cTbale from "../../../components/tablePage/tablePage";
import minix from "../../../mixins/table";
export default {
  components: {
    listHeader,
    cTbale,
  },
  mixins: [minix],
  data() {
    return {
      type: "ledger",
      title: "设备台账",
      indexurl:"ledgerPage",
      delurl: "ledgerDel",
      columns: [
        { text: "设备编号", prop: "IDENTITY", width: "6%" },
        { text: "名称", prop: "NAME", width: "10%" },
        { text: "属性描述", prop: "PROPERTIES", width: "10%" },
        { text: "规格型号", prop: "MODEL_TYPE", width: "10%" },
        { text: "厂家", prop: "PRODUCTER", width: "7%" },
        { text: "生产日期", prop: "PRODUCT_DATE", width: "7%" },
        { text: "保修期", prop: "WARRANTY_PERIOD", width: "7%" },
        { text: "安装地点", prop: "LOCATION", width: "7%" },
        { text: "配用电机型号", prop: "ADAPTER_ELECTRIC", width: "8%" },
        { text: "配用变频/软启型号", prop: "ADAPTER_OTHER", width: "8%" },
        { text: "是否启用", prop: "USED", width: "5%" },
      ],
    };
  },
};
</script>

<style>
/* 分页 */
.page_con {
  margin: 0 auto;
  position: fixed;
  left: 50%;
  bottom: -20px;
  height: 100px;
  transform: translate(-50%, 0);
}
</style>